	
// Adresse.h : Declaration of the CAdresse

#ifndef __ADRESSE_H_
#define __ADRESSE_H_

#include "resource.h"       // main symbols
#include "EBASDLL.h"
#include "AdresseImpl.h"

/////////////////////////////////////////////////////////////////////////////
// CAdresse
class ATL_NO_VTABLE CAdresse : 
	public CComObjectRootEx<CComMultiThreadModel>,
	public CComCoClass<CAdresse, &CLSID_Adresse>,
	public ISupportErrorInfo,
	public IDispatchImpl<IAdresse, &IID_IAdresse, &LIBID_EBASDLLLib>
{
public:
	CAdresse()
	{
		m_pUnkMarshaler = NULL;
		m_adresse = new CAdresseImpl;
	}
	virtual ~CAdresse()
	{
		if (m_adresse) {
			delete m_adresse;
			m_adresse = NULL;
		}
	}

DECLARE_REGISTRY_RESOURCEID(IDR_ADRESSE)
DECLARE_GET_CONTROLLING_UNKNOWN()

DECLARE_PROTECT_FINAL_CONSTRUCT()

BEGIN_COM_MAP(CAdresse)
	COM_INTERFACE_ENTRY(IAdresse)
	COM_INTERFACE_ENTRY(IDispatch)
	COM_INTERFACE_ENTRY(ISupportErrorInfo)
	COM_INTERFACE_ENTRY_AGGREGATE(IID_IMarshal, m_pUnkMarshaler.p)
END_COM_MAP()

	HRESULT FinalConstruct()
	{
		return CoCreateFreeThreadedMarshaler(
			GetControllingUnknown(), &m_pUnkMarshaler.p);
	}

	void FinalRelease()
	{
		m_pUnkMarshaler.Release();
	}

	CComPtr<IUnknown> m_pUnkMarshaler;

// ISupportsErrorInfo
	STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid);

// IAdresse
public:
	STDMETHOD(get_Attention)(/*[out, retval]*/ BSTR *pVal);
	STDMETHOD(put_Attention)(/*[in]*/ BSTR newVal);
	STDMETHOD(get_By)(/*[out, retval]*/ BSTR *pVal);
	STDMETHOD(put_By)(/*[in]*/ BSTR pVal);
	STDMETHOD(get_PostNummer)(/*[out, retval]*/ BSTR *pVal);
	STDMETHOD(put_PostNummer)(/*[in]*/ BSTR newVal);
	STDMETHOD(get_GUID)(/*[out, retval]*/ BSTR *pVal);
	STDMETHOD(put_GUID)(/*[in]*/ BSTR newVal);
	STDMETHOD(get_AdresseType)(/*[out, retval]*/ BSTR *pVal);
	STDMETHOD(put_AdresseType)(/*[in]*/ BSTR newVal);
	STDMETHOD(get_Email)(/*[out, retval]*/ BSTR *pVal);
	STDMETHOD(put_Email)(/*[in]*/ BSTR newVal);
	STDMETHOD(get_Telefax)(/*[out, retval]*/ BSTR *pVal);
	STDMETHOD(put_Telefax)(/*[in]*/ BSTR newVal);
	STDMETHOD(get_Telefon)(/*[out, retval]*/ BSTR *pVal);
	STDMETHOD(put_Telefon)(/*[in]*/ BSTR newVal);
	STDMETHOD(get_Gade)(/*[out, retval]*/ BSTR *pVal);
	STDMETHOD(put_Gade)(/*[in]*/ BSTR newVal);
private:
	CAdresseImpl * m_adresse;
};

#endif //__ADRESSE_H_
